<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
Hello Nest
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.5.0/axios.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/qs/6.11.2/qs.min.js"></script>
<script>
    const obj = {
        params() {
            axios('/demo/user/yang').then((res) => {
                console.log(res)
            })
        },
        query() {
            axios('/demo/user/detail', { id: '13234' }).then(res => {
                console.log(res)
            })
        },
        encoded() {
            axios.post('/demo/user/formUrl', Qs.stringify({
                name: '清醒',
                age: 28
            }), {
                headers: {
                    'content-type': 'application/x-www-form-urlencoded'
                }
            })
        }
    }

    obj.encoded()
</script>
</html>